/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;
import java.util.Random;

/**
 * <p>Project: jse2302 - Ex
 * <p>Powered by webrx On 2023-06-14 17:06:20
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex {
    public static void main(String[] args) {
        Random rand = new Random();
        //5次
        for (int x = 0; x < 5; x++) {

            //1-32
            int[] reds = new int[6];
            for (int i = 0; i < reds.length; i++) {
                int ball = rand.nextInt(1, 33);
                boolean f = true;
                for (int n : reds) {
                    if (n == ball) {
                        f = false;
                        break;
                    }
                }
                if (f) {
                    reds[i] = ball;
                } else {
                    --i;
                }
            }
            Arrays.sort(reds);

            //1-16
            int blue = rand.nextInt(1, 17);
            //System.out.println("红:" + Arrays.toString(reds) + "  蓝：[" + blue + "]");
            System.out.printf("\033[31m %02d %02d %02d %02d %02d %02d\033[0m \033[34m %02d \033[0m%n", reds[0], reds[1], reds[2], reds[3], reds[4], reds[5], blue);
        }
    }
}
